home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 112 / EnigmaAmiga112CD.iso / dalla rivista / awnpipe / awnp / awnp-docs / extensions.doc < prev    next >
Text File  |  2000-05-18  |  7KB  |  157 lines

  1. X or x option
  2. ==============
  3.  
  4. These options let you open a pipe whose second end is connected to various
  5. special hosts. (you only open these pipes once)
  6.  
  7. The X option is always followed by additional character(s). The second character determines what type of pipe is opened.
  8.  
  9. X0[(r|w)filename]  (Programmable replacement)
  10.  
  11.  Programmable replacement of a character. A single character is looked for in data written to the pipe and replaced by a multy character string.
  12.  
  13.  First write two bytes to the pipe. the first byte is always '1' the second byte is the target character to be replaced. Then write a byte giving the length of the replacement string (<=255) followed by the replacement string. Do NOT include a terminating null .
  14.  
  15.  Data written to the pipe after this point is echoed back to the pipe with any occurrences of the target character replaced by the specified string.
  16.  
  17.  X0wfilename causes the data to be echoed to a file rather than back to the pipe.
  18.  
  19.  X0rfilename causes the data to be read from a file rather than from the pipe. Note that the target character and replacement string is still read from the pipe not the external file. Only data to be parsed and replaced is read from the file.
  20.  
  21. THE THREE TOOLTYPE HOSTS
  22. ------------------------
  23.  
  24. Xt[filename]   (find Tooltypes)
  25.  
  26.  This host is the best suited to quickly check for tooltypes and get there values.
  27.  
  28.  The icon file for the specified file (you do NOT add '.icon') is queried.
  29.  
  30.  Open the file awnpipe:myname/Xt[filename]. Write a line containing the tooltype you wish to query to the pipe. Read back a response line.
  31.  
  32.  If no icon file is found an eof is returned.
  33.  
  34.  If the tooltype is NOT found you will read back a null line (only a <cr>).
  35.  
  36.  If the tool type IS found you will read back 'ok ' followed by the tooltypes value (if it has one).
  37.  
  38. Xi[filename]   (Icon information)
  39.  
  40.  This host will retrieve fuller details about tooltypes and some other icon information. It is often used in combination with the following host.
  41.  
  42.  The icon file for the specified file (you do NOT add '.icon') is read. The pipe returns the following lines...
  43.  
  44. icon_type x y stack
  45. default tool
  46. tool window
  47. first tooltype
  48. second tooltype
  49. ...
  50.  
  51. If no icon file is found  no data is returned. Note that for blank lines will be returned when the information does not apply to that icon type.
  52.  
  53. example: awnpipe:/xidevs:dosdrivers/awnpipe  returns
  54.  
  55. 4 3 139 4096
  56. C:Mount
  57.  
  58. ACTIVATE=0
  59.  
  60. To get information on a volume (say dh1:) use 'awnpipe:/xidh1:disk'.
  61.  
  62. Xs[filename]  (Set icon information)
  63.  
  64.  This host will alter or create the icon and tooltypes for the specified file.
  65. Data is written to the host in the same format as returned by the preceding
  66. host.
  67.  
  68. icon_type x y stack
  69. default tool
  70. tool window
  71. first tooltype
  72. second tooltype
  73. third ...
  74.  
  75. Icon_type, x, y, and stack are all integer values written on a single line.
  76.  
  77. Default tool and the tooltypes are ascii strings.
  78.  
  79. Tool window is ignored but MUST still be included, either use a blank line ('0A'x) or used the data returned by the Xi host.
  80.  
  81. The first three lines are always required. You may set as many tooltypes as you like including none.
  82.  
  83. some useful information:
  84.  
  85. setting x and y to -2147483648 unsnapshots the icon.
  86. icon_type 1=disk 2=drawer 3=tool 4=project
  87.  
  88. Xm[c][(r|w)filename]  (pattern Matching)
  89.  
  90.  Pattern match Conversation. This conversation supports full ADOS pattern matching. The trailing 'c' will make the match case sensitive.
  91.  
  92.  Xmwfilename causes the match result to be sent to a file rather than back to the pipe.
  93.  
  94.  Xmrfilename causes the data to be read from a file rather than from the pipe. The match results are read back from the pipe.
  95.  
  96. NOTE: the replies are ascii terminated with a newline.
  97.  
  98. Write the pattern to the pipe terminated with a newline. (<500 chars) The pipe returns 'ok 1' when you sent a valid pattern to match to. It returns 'ok 0' if you did not send a pattern ( the pipe will look only
  99. for exact matches).
  100.  
  101. write a string to the pipe terminated with a newline.(<500 chars) read the reply  '0' (no match) '1' (is a match)
  102.  
  103. write as many stings as you like . Close pipe to end. The terminating newlines are ignored while matching.
  104.  
  105.  
  106. Xk      (Keystroke filter)
  107.  
  108.  Filter keystrokes from the input device event stream and receive notifications of the keystroke.
  109.  
  110.  First write a byte to the pipe setting the priority of the key parse handler. It is a signed byte -128 to 127. If you are not sure what you want use 51 (0x33).
  111.  
  112.  Next  write a byte to the pipe indicating how many keystrokes to filter. The maximum is 255 (0x'ff'). 0 is NOT valid.
  113.  
  114. 0x'0a' is 10 keys.
  115.  
  116.  Then write two bytes to the pipe indicating how often a null match should be sent (to stop your task waiting forever for a match that never happens).
  117.  
  118.  0x'0032' is 50/100s of a second.
  119.  
  120.  Now write 4 bytes defining each key you wish to be notified of.  The first two bytes are the key the second two bytes are the qualifier.
  121.  
  122.  Writing 0x'00200001' to the pipe sets the 'a' key 'leftshifted' to be filtered from the event stream.
  123.  
  124.  You MUST set exactly the same amount of keys as specified above.
  125.  
  126.  Once the setup is complete you read notification from the pipe. Each notification is 1 byte giving a match number, the first keystroke you specified is 1, the second 2 ...
  127.  
  128.  A byte of 0 is a null event, no match occurred.
  129.  
  130.  Close the pipe to end key filtering. NOTE the keyparse handler actually does not get removed until the NEXT match or null event.
  131.  
  132. Xe   (key Event generator)
  133.  
  134.  Write keystrokes to the input device event stream.
  135.  
  136.  Each keystroke is sent by writing 4 bytes to this pipe. The first two bytes are the key the second two bytes are the qualifier.
  137.  
  138.  Writing 0x'00200001' to the pipe sends the 'a' key 'leftshifted'.
  139.  
  140.  You may close the pipe at any time.
  141.  
  142. Xea   (key events form Ascii)
  143.  
  144.  Write keystrokes to the input device event stream from a string source.
  145.  
  146.  Each keystroke is sent by writing a byte to this pipe. You do NOT need to write one character at a time. Simply write ascii text to the pipe and it will generate keystrokes as if the string had been typed at the keyboard.
  147.  
  148.  This is easier than writing keycodes and qualifiers to the pipe but you can not generate 'special keystrokes' like Alt-F10 .
  149.  
  150.  You may close the pipe at any time.
  151.  
  152. Xc[(r|w)filename]    (ClassAct/Reaction host)
  153.  
  154.  ClassAct Window Conversation. The Window and gadgets are defined by writing to the pipe:. Gadget hits and error/confirmation information is read from the pipe. A filename may also be given. If the file is specified as write 'w' the output of the pipe is directed to that file. If the file is specified as read 'r' the window and gadget definitions are read from the file.
  155.  
  156.  See the GUI Creation section of the docs for details.
  157.